home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 4640 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.8 KB

  1. Path: ix.netcom.com!netnews
  2. From: miker3@ix.netcom.com (Mike Rubenstein)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: help
  5. Date: Wed, 31 Jan 1996 13:44:11 GMT
  6. Organization: Netcom
  7. Message-ID: <310f7098.51204736@nntp.ix.netcom.com>
  8. References: <4emgep$mvh@leol.net-link.net>
  9. NNTP-Posting-Host: ix-dc6-05.ix.netcom.com
  10. X-NETCOM-Date: Wed Jan 31  5:44:32 AM PST 1996
  11. X-Newsreader: Forte Agent .99c/16.141
  12.  
  13. Rusty <russell@net-link.net> wrote:
  14.  
  15. >      I'm a (very) new C++ programmer, and I can not get the
  16. > compiler to work. I am using Borland Turbo C ++ 4.5 for Windows,
  17. > and I am trying to make a very simple program from a 
  18. > teach-your-self book. The program is:
  19. > -----------
  20. > main()
  21. > {
  22. > printf("Hello, world. \n");
  23. > }
  24. > -------------
  25. > I create a new project, type this in, click the lightning-bolt
  26. > (make and run program), and it gives me an error message and
  27. > does not run the program. If you have any idea why this is,
  28. > or know how to make it work, please tell me via this newsgroup,
  29. > or preferably E-MAIL. My address is russell@net-link.net   .
  30.  
  31. If your compiler just "gives you an error message," get rid of it and
  32. get one that tells you something useful when you make an error.
  33.  
  34. But, I'm quite sure that Turbo C++ does not just "give you an error
  35. message."  It gives you an error message that says something.  What it
  36. says might be useful in tracking down the problem.
  37.  
  38. The best I can guess is that you are compiling as a windows program.
  39. printf() is not supported in windows programs and execution does not
  40. start at main.  Change your project settings to compile as a DOS
  41. application (if possible -- I'm not sure if Turbo C++ supports that)
  42. or an easywin application (or whatever Borland calls their
  43. pseudo-standard windows programs).  Alternatively, rewrite the program
  44. as a Windows program.
  45.  
  46.  
  47. Michael M Rubenstein
  48.